package top.plgxs.basic.one;

/**
 * <p> 重写 </p>
 *
 * @author Stranger.
 * @since 2022/9/7 17:02
 */
public class OverrideA {
    public static void main(String[] args) {
        Base base = new Son();
        base.method();
//        base.methodB();
    }
}
class Base {
    public void method() {
        System.out.println("Base");
    }
}

class Son extends Base {
    @Override
    public void method() {
        System.out.println("Son");
    }

    public void methodB() {
        System.out.println("SonB");
    }
}
